<!DOCTYPE html>

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>宽带组 :  周报</title>

  <link href="../css/bootstrapmin.css" rel="stylesheet" media="screen">
  <link href="../css/style.css" rel="stylesheet">
	<script type="text/javascript" src="../js/header.js"></script>




  
</head>
<?php
require("header.php");
?>

<!-- end of header -->

 
    
 
                    <!-- TOC START -->
<div id= "achievement">
<?php
	require("../DBops.php");
	session_start();
	if(isset($_SESSION['user'])){
	$con = connect("localhost", "root", "", "lab");
	$result = query($con, "*", "personalinfo", "ID", $_SESSION['user']);
	$row = mysql_fetch_array($result);
	
	
	
		echo "<div style='height:30px;background:#A4D3EE;'>
		      
              <p  style='margin-right:10px;float:right;'>登录为: <a href = \"../infor.php?id=".$_SESSION['user']."\">".$_SESSION['user']."</a></font>&nbsp&nbsp<a  onclick=\"if(confirm('确定要退出系统吗?')){parent.location.href ='../logout.php'}\" href=\"javascript:void(0)\">退出</a></font></p></div>";
	}
	else
	{
		$_SESSION['userurl'] = $_SERVER['REQUEST_URI']; 
		//echo $_SESSION['userurl'];
		//echo "<script>alert(\"".$_SESSION['userurl']."\");</script>";
		echo "<script>location.href = \"../login.php\";</script>";
		
		/*echo "<div style='height:30px;background:#A4D3EE;'>
				<ul>
              <li  style='margin-right:10px;float:right;'><a href ='login.php'>登录</a></div>";*/
	}
?>
<!-- /header -->
<?php
	
echo "<div style=\"width:500px;height:400px;float:left\">
		<p>&nbsp;&nbsp;<strong>日志更新</strong></p>
	<div >
	<div class=\"table sectionedit2\">
		<table class=\"inline\">
			<tbody>
			<tr class=\"row0\">";
			
			
	$con = connect("localhost", "root", "", "lab");

	//$result = mysql_query("select * from projecteam");
	//$row = mysql_fetch_array($result);

	echo"<div class='table sectionedit2'>
		<table >
			<tbody>	";
			
			$result = mysql_query("select * from projecteam");
			//$count = mysql_num_rows($result);
							
			while($row=mysql_fetch_array($result)){
					echo"<tr class='row0'>";	
				//$result = query($con, "*", "projecteam", "ID", $i);
				//$row = mysql_fetch_array($result);

				echo"
				<th  style='width:150px;'> ".$row['name']." </th>
				<td style='width:100px;'><a href='con_summary/Conference_report.php?id=".$row['ID']."'>会议纪要</a></td>";
				$result1 = mysql_query("select * from personalinfo where projecteamID=".$row['ID']);
				$stu_num=mysql_num_rows($result1);
				$stu_perow= ceil($stu_num/4);
				//echo $stu_num;
				//echo $stu_perow;
				for($i=0;$i<$stu_perow;$i++){
				//echo"<tr class='row0'>";
				$y=0;	
	
				while($y<4&&$row1 = mysql_fetch_array($result1)){
					if($row1['role']=='student')
					echo"<td  style='width:70px;'><a href=\"weeklyreport/Report.php?id=".$row1['ID']."\"  title=\"".$row1['name']."\">".$row1['name']."</a></td>";
					$y++;
					
				}
				echo"</tr>";
				if($i==($stu_perow-1))echo"";
				else
				echo"<tr><td></td><td></td>";
			}
				
		}
		
	?>
	
</tbody></table></div>
<hr>

</div>
</div>



   <div style="width:150px;height:400px;float:right;">

            <!-- ********** CONTENT ********** -->
            <div id="dokuwiki__content">
				

                

                                                            <!-- wikipage start -->
                    <!-- TOC START -->
           <div id="dw__toc">
<p class="toggle open" style="margin-right:100px;"><strong>−</strong><strong><span>−</span></strong>目录</p>
<div><ul >
<?php

$result = query($con, "*", "personalinfo", "ID", $_SESSION['user']);
$row = mysql_fetch_array($result);
$user=$_SESSION['user'];
$teamid=$row['projecteamID'];


if($row['role']=="administrator"){
echo"<li class='level2' style='clear:left;'><div class='li'><a href='pro_manage/Team_index.php'>项目组管理</a></div></li>
<li class='level2' style='clear:left;'><div class='li'><a href='pro_manage/TeamMember_index.php'>成员管理</a></div></li>
";}
if ($row['role']=='teacher'||($row['adminID']>0&&$row['role']=='student')){echo"<li class='level2' style='clear:left;'><div class='li'><a href='pro_manage/TeamMember_index.php'>成员管理</a></div></li>
";}
if ($row['role']=='student'&&$teamid>0){echo"
<li class='level2'><a href='weeklyreport/template.php?id=$user'>添加周报</a></li>
<li class='level2'><a href='con_summary/template_con.php?id=$teamid'>添加会议纪要</a></li>
</li>";}
?>
<li class="level2"><a href="history/History_index.php">历史记录</a></li>


</ul>
</div>
</div>
</div>
</div>
<!-- TOC END -->


  


          
</div>
        
		<br/><br/>
<!-- ********** FOOTER ********** -->

</body>

</html>